package com.polaris.live.im.sfs.bean.live

import android.os.Parcelable
import android.text.SpannableStringBuilder
import com.polaris.live.im.sfs.core.bean.AbstractMessage
import kotlinx.parcelize.IgnoredOnParcel
import kotlinx.parcelize.RawValue

/**
 * SendLiveMessage
 *
 * @author Created by 半仙 on 2023/9/13 14:08
 * @since 1.0.0
 */
@kotlinx.parcelize.Parcelize
data class SendLiveMessage(
    /**
     * 消息唯一id
     */
    override val msgId: String = "",
    /**
     * 业务类型 通话1 直播2
     */
    val businessType: Int = -1,
    /**
     * 业务id 当前业务主键   如果当前业务主键不一致不用处理
     */
    val businessId: Long = -1,
    /**
     * 消息类型
     */
    val type: Int = -1,
    /**
     * 消息内容
     */
    val content: String = "",
    /**
     * 消息载体
     */
    var payload: @RawValue Any? = null,
    /**
     * 拓展信息
     */
    val ext: @RawValue Any? = null,
    /**
     * 消息发送时间戳
     */
    val timestamp: Long = -1,
) : AbstractMessage, Parcelable {

    /**
     * span缓存1
     */
    @IgnoredOnParcel
    @Transient
    var span1: SpannableStringBuilder? = null

    /**
     * span缓存2
     */
    @IgnoredOnParcel
    @Transient
    var span2: SpannableStringBuilder? = null

}